package com.miot.object.scene;

import java.io.Serializable;
import java.util.List;

/**
 * @Author: zhangyanbin
 * @Date: 2019/1/25 14:44
 * @Version 1.0
 */
public class PackageSceneVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * enable : true
     * enable_push : false
     * action_list : [{"tr_id":201,"model":"xiaomi.wifispeaker.s12","payload":{"did":"114703712","value":"您好，欢迎光临","command":"xiaomi.wifispeaker.s12.tts","plug_id":"action_tts"},"plug_id":"action_tts","type":0,"keyName":"播放指定文字","name":"小米AI音箱","sa_id":"1808"},{"tr_id":201,"model":"lumi.gateway.v3","payload":{"did":"80968247","value":"on","command":"lumi.gateway.v3.toggle_light","extra":"[1,19,7,111,[48,1],0,0]"},"sa_id":"140","type":0,"keyName":"开夜灯","name":"米家多功能网关"}]
     * launch : {"express":0,"attr":[{"device_name":"米家门窗传感器","did":"lumi.158d00026a2e0d","extra":"[1,6,1,0,[0,1],2,0]","src":"device","tr_id":107,"sc_id":"20","key":"event.lumi.sensor_magnet.v2.open","value":"","default_value":0,"name":"打开","device_abbr":"窗磁/门磁（旧）·"}]}
     */

    private boolean enable;
    private boolean enable_push;
    private LaunchBean launch;
    private List<ActionListBean> action_list;

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public boolean isEnable_push() {
        return enable_push;
    }

    public void setEnable_push(boolean enable_push) {
        this.enable_push = enable_push;
    }

    public LaunchBean getLaunch() {
        return launch;
    }

    public void setLaunch(LaunchBean launch) {
        this.launch = launch;
    }

    public List<ActionListBean> getAction_list() {
        return action_list;
    }

    public void setAction_list(List<ActionListBean> action_list) {
        this.action_list = action_list;
    }

    public static class LaunchBean {
        /**
         * express : 0
         * attr : [{"device_name":"米家门窗传感器","did":"lumi.158d00026a2e0d","extra":"[1,6,1,0,[0,1],2,0]","src":"device","tr_id":107,"sc_id":"20","key":"event.lumi.sensor_magnet.v2.open","value":"","default_value":0,"name":"打开","device_abbr":"窗磁/门磁（旧）·"}]
         */

        private int express;
        private List<AttrBean> attr;

        public int getExpress() {
            return express;
        }

        public void setExpress(int express) {
            this.express = express;
        }

        public List<AttrBean> getAttr() {
            return attr;
        }

        public void setAttr(List<AttrBean> attr) {
            this.attr = attr;
        }

        public static class AttrBean {
            /**
             * device_name : 米家门窗传感器
             * did : lumi.158d00026a2e0d
             * extra : [1,6,1,0,[0,1],2,0]
             * src : device
             * tr_id : 107
             * sc_id : 20
             * key : event.lumi.sensor_magnet.v2.open
             * value :
             * default_value : 0
             * name : 打开
             * device_abbr : 窗磁/门磁（旧）·
             */

            private String device_name;
            private String did;
            private String extra;
            private String src;
            private int tr_id;
            private String sc_id;
            private String key;
            private Object value;
            private int default_value;
            private String name;
            private String device_abbr;

            public String getDevice_name() {
                return device_name;
            }

            public void setDevice_name(String device_name) {
                this.device_name = device_name;
            }

            public String getDid() {
                return did;
            }

            public void setDid(String did) {
                this.did = did;
            }

            public String getExtra() {
                return extra;
            }

            public void setExtra(String extra) {
                this.extra = extra;
            }

            public String getSrc() {
                return src;
            }

            public void setSrc(String src) {
                this.src = src;
            }

            public int getTr_id() {
                return tr_id;
            }

            public void setTr_id(int tr_id) {
                this.tr_id = tr_id;
            }

            public String getSc_id() {
                return sc_id;
            }

            public void setSc_id(String sc_id) {
                this.sc_id = sc_id;
            }

            public String getKey() {
                return key;
            }

            public void setKey(String key) {
                this.key = key;
            }

            public Object getValue() {
                return value;
            }

            public void setValue(Object value) {
                this.value = value;
            }

            public int getDefault_value() {
                return default_value;
            }

            public void setDefault_value(int default_value) {
                this.default_value = default_value;
            }

            public String getName() {
                return name;
            }

            public void setName(String name) {
                this.name = name;
            }

            public String getDevice_abbr() {
                return device_abbr;
            }

            public void setDevice_abbr(String device_abbr) {
                this.device_abbr = device_abbr;
            }
        }
    }

    public static class ActionListBean {
        /**
         * tr_id : 201
         * model : xiaomi.wifispeaker.s12
         * payload : {"did":"114703712","value":"您好，欢迎光临","command":"xiaomi.wifispeaker.s12.tts","plug_id":"action_tts"}
         * plug_id : action_tts
         * type : 0
         * keyName : 播放指定文字
         * name : 小米AI音箱
         * sa_id : 1808
         */

        private int tr_id;
        private String model;
        private PayloadBean payload;
        private String plug_id;
        private int type;
        private String keyName;
        private String name;
        private String sa_id;

        public int getTr_id() {
            return tr_id;
        }

        public void setTr_id(int tr_id) {
            this.tr_id = tr_id;
        }

        public String getModel() {
            return model;
        }

        public void setModel(String model) {
            this.model = model;
        }

        public PayloadBean getPayload() {
            return payload;
        }

        public void setPayload(PayloadBean payload) {
            this.payload = payload;
        }

        public String getPlug_id() {
            return plug_id;
        }

        public void setPlug_id(String plug_id) {
            this.plug_id = plug_id;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getKeyName() {
            return keyName;
        }

        public void setKeyName(String keyName) {
            this.keyName = keyName;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getSa_id() {
            return sa_id;
        }

        public void setSa_id(String sa_id) {
            this.sa_id = sa_id;
        }

        public static class PayloadBean {
            /**
             * did : 114703712
             * value : 您好，欢迎光临
             * command : xiaomi.wifispeaker.s12.tts
             * plug_id : action_tts
             */

            private String did;
            private Object value;
            private String command;
            private String plug_id;
            private String extra;
            private String title;
            private String desc;

            public String getDid() {
                return did;
            }

            public void setDid(String did) {
                this.did = did;
            }

            public Object getValue() {
                return value;
            }

            public void setValue(Object value) {
                this.value = value;
            }

            public String getCommand() {
                return command;
            }

            public void setCommand(String command) {
                this.command = command;
            }

            public String getPlug_id() {
                return plug_id;
            }

            public void setPlug_id(String plug_id) {
                this.plug_id = plug_id;
            }

            public String getExtra() {
                return extra;
            }

            public void setExtra(String extra) {
                this.extra = extra;
            }

            public String getTitle() {
                return title;
            }

            public void setTitle(String title) {
                this.title = title;
            }

            public String getDesc() {
                return desc;
            }

            public void setDesc(String desc) {
                this.desc = desc;
            }
        }
    }
}
